package com.techsoul.common.core.enums;

public enum HttpStatusEnum {

    SUCCESS(200, "操作成功"),
    CREATED(201, "对象创建成功"),
    ACCEPTED(202, "请求已经被接受"),
    NO_CONTENT(204, "操作已经执行成功，但是没有返回数据"),
    MOVED_PERM(301, "资源已被移除"),
    SEE_OTHER(303, "重定向"),
    NOT_MODIFIED(304, "资源没有被修改"),
    BAD_REQUEST(400, "请求参数有误"),
    UNAUTHORIZED(401, "认证失败，无法访问系统资源"),
    FORBIDDEN(403, "访问受限，授权过期"),
    NOT_FOUND(404, "资源，服务未找到"),
    BAD_METHOD(405, "不允许的HTTP方法"),
    CONFLICT(409, "资源冲突，或者资源被锁"),
    UNSUPPORTED_TYPE(415, "不支持的数据，媒体类型"),
    ERROR(500, "系统异常，请稍后再试"),
    NOT_IMPLEMENTED(501, "接口未实现"),
    NETWORK_EXCEPTION(101001, "网络异常，请稍后再试"),
    TOKEN_ILLEGAL_EXCEPTION(102001, "非法 token"),
    TOKEN_TIMEOUT_EXCEPTION(102002, "token 失效"),
    TOKEN_EXISTS_EXCEPTION(102003, "其他客户端登录了"),
    USER_EXCEPTION(100200, "用户名或密码错误"),
    USER_LOGIN_EXCEPTION(102004, "用户名或密码错误"),
    USER_ROLE_EXCEPTION(102005, "用户角色异常"),
    ACCOUNT_ISLOCK_EXCEPTION(102006, "该账户已被锁定，请联系管理员"),
    ACCOUNT_STATUS_EXCEPTION(102007, "该账户已被禁用，请联系管理员"),
    AUTH_ILLEGAL_EXCEPTION(102008, "当前用户权限非法"),
    PARAM_EXCEPTION(100300, "参数异常"),
    PARAM_ILLEGAL_EXCEPTION(103001, "非法参数"),
    DATA_REPEAT_EXCEPTION(103002, "数据存在重复"),
    BUSINESS_EXCEPTION(1003003, "业务操作异常"),
    BUSINESS_ILLEGAL_EXCEPTION(103003, "非法的业务操作"),
    BUSINESS_MESSAGE_EXCEPTION(103004, "非法的业务通知"),
    SQL_EXCEPTION(104000, "SQL异常"),
    TASK_EXCEPTION(104001, "定时任务异常"),
    SYNC_EXCEPTION(104002, "同步异常，请联系管理员"),
    FILE_EXCEPTION(105001, "文件异常"),
    FILE_UPLOAD_EXCEPTION(105002, "上传文件异常"),
    FILE_DOWNLOAD_EXCEPTION(105003, "下载文件异常"),
    EXCEL_EXCEPTION(105003, "Excel处理异常"),
    MESSAGE_SMS_EXCEPTION(106001, "短信通知异常"),
    MESSAGE_WECHAT_EXCEPTION(106002, "微信通知异常"),
    WECHAT_EXCEPTION(107001, "微信异常"),
    ALIYUN_EXCEPTION(108001, "阿里云异常"),
    CHINAPAY_EXCEPTION(109001, "银联支付异常"),
    UTIL_EXCEPTION(109001, "工具类异常"),
    GEN_EXCEPTION(109000, "代码生成异常");

    /**
     * 状态编码
     */
    private final Integer code;

    /**
     * 状态描述
     */
    private final String msg;

    HttpStatusEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

}
